'use strict'


var React = require('react-native');

var {
  Component,
  Text,
  View,
  StyleSheet,
} = React;

import codePush from "react-native-code-push";


class TextViewComp extends Component {
  componentDidMount() {
    // codePush.checkForUpdate()
    // .then((update) => {
    //     if (!update) {
    //         console.log("The app is up to date!");
    //     } else {
    //         console.log("An update is available! Should we download it?");
    //     }
    // });
    codePush.sync();
  }

  render() {
    return(
      <Text style={{marginTop:20}}>hello 1.0.0</Text>
    );
  }
}

// var TextViewCom = React.createClass({
//   componentDidMount: function() {
//     codePush.sync();
//   }
//   render: function() {
//     return (
//       <Text style={{marginTop:20}}>1.0</Text>
//     );
//   }
// });

module.exports = TextViewComp;
